import axios from "./axios"

export default {
    // 用户登录
    Userquery: (data) => {
        return axios({
            method: "post",
            url: "user/login",
            data
        })
    },
    // 用户注册
    Useradd: (data) => {
        return axios({
            method: "post",
            url: "user/registerOrUpdate",
            data
        })
    },
    // 用户退出登陆
    LoginOut: (data) => {
        return axios({
            method: "post",
            url: "user/loginOut",
            data
        })
    },
    // 用户是否登录
    isLogin: (data) => {
        return axios({
            method: "post",
            url: "admin/isLogin",
            data
        })
    },
    // 企业登录
    companyLogin: (data) => {
        return axios({
            method: "post",
            url: "company/Login",
            data
        })
    },

    // 企业退出登陆
    companyLoginOut: (data) => {
        return axios({
            method: "post",
            url: "company/loginOut",
            data
        })
    },

    // 企业注册
    companyRegister: (data) => {
        return axios({
            method: "post",
            url: "company/registerOrUpdate",
            data
        })
    },

    // 验证码
    getcode: (data) => {
        return axios({
            method: "get",
            url: "file/getImg",
            data
        })
    },

    // 简历信息列表
    getresumeList: (data) => {
        return axios({
            method: "get",
            url: "resume/toPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "type": data.type,
                "title": data.title
            }
        })
    },
    // 查看简历详情
    getResumeData: (id) => {
        return axios({
            method: "get",
            url: "resume/getData/" + id,
        })
    },
    // 发布或修改简历信息
    uploadFile: (data) => {
        return axios({
            method: "post",
            url: "file/upload",
            data
        })
    },

    // 上传简历
    addresume: (data) => {
        return axios({
            method: "post",
            url: "resume/addOrUpdate",
            data
        })
    },
    // 获取简历
    getResume: (data) => {
        return axios({
            method: "get",
            url: "resume/getResume",
            data
        })
    },
    // 招聘信息列表
    getjobList: (data) => {
        return axios({
            method: "get",
            url: "job/toPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "post": data.post,
            }
        })
    },

    // 查看招聘详情
    tojobDetail: (id) => {
        return axios({
            method: "get",
            url: "job/select/" + id,
        })
    },

    // 发布或修改招聘信息
    addjob: (data) => {
        return axios({
            method: "post",
            url: "job/addOrUpdate",
            data
        })
    },

    // 发布招聘列表
    addjobList: (data) => {
        return axios({
            method: "get",
            url: "company/jobList",
            data
        })
    },

    // 删除发布招聘列表
    deletejobList: (id) => {
        return axios({
            method: "delete",
            url: "job/delete/" + id,
        })
    },
}